﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="titleauthor.aspx.vb" Inherits="prueba.WebForm10" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table id="table1" style="width:100%;">
        <tr>
            <td>
                <asp:GridView ID="GridView1" runat="server" 
                    DataSourceID="titleauthorSqlDataSource1" AutoGenerateColumns="False" 
                    DataKeyNames="au_id,title_id">
                    <Columns>
                        <asp:BoundField DataField="au_id" HeaderText="au_id" ReadOnly="True" 
                            SortExpression="au_id" />
                        <asp:BoundField DataField="title_id" HeaderText="title_id" ReadOnly="True" 
                            SortExpression="title_id" />
                        <asp:BoundField DataField="au_ord" HeaderText="au_ord" 
                            SortExpression="au_ord" />
                        <asp:BoundField DataField="royaltyper" HeaderText="royaltyper" 
                            SortExpression="royaltyper" />
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="titleauthorSqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:pubsConnectionString21 %>" 
                    DeleteCommand="DELETE FROM [titleauthor] WHERE [au_id] = @au_id AND [title_id] = @title_id" 
                    InsertCommand="INSERT INTO [titleauthor] ([au_id], [title_id], [au_ord], [royaltyper]) VALUES (@au_id, @title_id, @au_ord, @royaltyper)" 
                    SelectCommand="SELECT * FROM [titleauthor]" 
                    UpdateCommand="UPDATE [titleauthor] SET [au_ord] = @au_ord, [royaltyper] = @royaltyper WHERE [au_id] = @au_id AND [title_id] = @title_id">
                    <DeleteParameters>
                        <asp:Parameter Name="au_id" Type="String" />
                        <asp:Parameter Name="title_id" Type="String" />
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:ControlParameter ControlID="TxtBox1au_id" Name="au_id" PropertyName="Text" 
                            Type="String" />
                        <asp:ControlParameter ControlID="TxtBox2title_id" Name="title_id" 
                            PropertyName="Text" Type="String" />
                        <asp:ControlParameter ControlID="TxtBox3au_ord" Name="au_ord" 
                            PropertyName="Text" Type="Byte" />
                        <asp:ControlParameter ControlID="TxtBox4royaltyper" Name="royaltyper" 
                            PropertyName="Text" Type="Int32" />
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="au_ord" Type="Byte" />
                        <asp:Parameter Name="royaltyper" Type="Int32" />
                        <asp:Parameter Name="au_id" Type="String" />
                        <asp:Parameter Name="title_id" Type="String" />
                    </UpdateParameters>
                </asp:SqlDataSource>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                    <asp:Label ID="Label1" runat="server" Text="au_id"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox1au_id" runat="server"></asp:TextBox>
                </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="font-weight: 700">
                    <asp:Label ID="Label2" runat="server" Text="title_id"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox2title_id" runat="server"></asp:TextBox>
                </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                    <asp:Label ID="Label3" runat="server" Text="au_ord"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox3au_ord" runat="server"></asp:TextBox>
                </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                    <asp:Label ID="Label4" runat="server" Text="royaltyper"></asp:Label>
&nbsp;
                    <asp:TextBox ID="TxtBox4royaltyper" runat="server"></asp:TextBox>
                </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                    <asp:Button ID="Button1" runat="server" Text="Enviar" />
                    <asp:Button ID="Button2" runat="server" Text="BORRAR" style="height: 26px" />
                </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
